package cn.eonshine.cuba.inf.modular.log.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author Alan
 * @since 2018-08-11
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("inf_log")
public class Log extends Model<Log> {

    private static final long serialVersionUID = 1L;

    /**
     * Primary key
     */
    @TableId("ID")
    private String id;
    /**
     * Operator date time
     */
    @TableField("OPERATE_TIME")
    private Date operateTime;
    /**
     * count total 
     */
    @TableField("TOTAL")
    private BigDecimal total;
    /**
     * send or receive success total
     */
    @TableField("SUCCESS_NUM")
    private BigDecimal successNum;
    /**
     * status: 200 - success, 400- failure
     */
    @TableField("STATUS")
    private String status;
    /**
     * process id
     */
    @TableField("PROCESS_ID")
    private String processId;
    /**
     * 接口名称
     */
    @TableField("OPERATE_URL")
    private String operateUrl;
    
    //临时字段
    @TableField(exist = false)
    private String opData;
    
    //临时字段
    @TableField(exist = false)
    private String exception;

    @TableField("LOG_TYPE_ID")
    private String logTypeId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
